﻿using System;
using System.Threading;

using SBPweb.Talk.Server.Library;

namespace SBPweb.Talk.Server.Web
{
    public class Global : System.Web.HttpApplication
    {

        //private SocketListener sl;
        private PolicySocketServer pss;

        protected void Application_Start(object sender, EventArgs e)
        {
            pss = new PolicySocketServer();
            pss.StartAsync();

            //sl = new SocketListener();
            //sl.StartAsync();
        }

        protected void Session_Start(object sender, EventArgs e)
        {

        }

        protected void Application_BeginRequest(object sender, EventArgs e)
        {

        }

        protected void Application_AuthenticateRequest(object sender, EventArgs e)
        {

        }

        protected void Application_Error(object sender, EventArgs e)
        {

        }

        protected void Session_End(object sender, EventArgs e)
        {

        }

        protected void Application_End(object sender, EventArgs e)
        {
            //sl.Stop();
            //sl = null;
        }
    }
}